﻿
/*----------------------------------------------------------------//
// 文件名：MoFileTemplate.cs
// 文件功能描述：实体 MoFileTemplate.
// 
// 创建标识：2009-03-10
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoFileTemplate
using System;
using System.Data;
using System.Globalization;
using System.Text;
using System.Xml;
using System.Data.Common;
namespace EQT.Model
{
	/// <summary>
	/// 业务实体MoFileTemplate
	/// </summary>
	public partial class MoFileTemplate:ICloneable
	{
		#region 表FileTemplate的字段
		private string _ft_id;
		private string _item_code;
		private string _xls_url;
		private string _doc_url;
		private string _rem;
		private DateTime _create_time;
		#endregion
		
		#region 构造函数
		public MoFileTemplate()
		{
		    
		    
		    
		    
		    
		    _create_time= DateTime.Now;
		}
		#endregion
		
		#region 拷贝构造函数

		public MoFileTemplate(MoFileTemplate item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoFileTemplate(string ft_id,string item_code,string xls_url,string doc_url,string rem,DateTime create_time)
		{
		this._ft_id=ft_id;
		this._item_code=item_code;
		this._xls_url=xls_url;
		this._doc_url=doc_url;
		this._rem=rem;
		this._create_time=create_time;
		}
		#endregion
		
		#region 表FileTemplate的字段属性
		/// <summary>
		/// FT_ID
		/// </summary>
		public string Ft_Id
		{
			get {return _ft_id;}
			set {_ft_id=value;}
		}
		/// <summary>
		/// ITEM_CODE
		/// </summary>
		public string Item_Code
		{
			get {return _item_code;}
			set {_item_code=value;}
		}
		/// <summary>
		///EXCEL模板
		/// </summary>
		public string Xls_Url
		{
			get {return _xls_url;}
			set {_xls_url=value;}
		}
		/// <summary>
		/// DOC_URL
		/// </summary>
		public string Doc_Url
		{
			get {return _doc_url;}
			set {_doc_url=value;}
		}
		/// <summary>
		/// REM
		/// </summary>
		public string Rem
		{
			get {return _rem;}
			set {_rem=value;}
		}
		/// <summary>
		/// CREATE_TIME
		/// </summary>
		public DateTime Create_Time
		{
			get {return _create_time;}
			set {_create_time=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoFileTemplate CopyTo(MoFileTemplate item)
        {
		    item.Ft_Id=this.Ft_Id;
		    item.Item_Code=this.Item_Code;
		    item.Xls_Url=this.Xls_Url;
		    item.Doc_Url=this.Doc_Url;
		    item.Rem=this.Rem;
		    item.Create_Time=this.Create_Time;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoFileTemplate NewFileTemplate=new MoFileTemplate();
		    NewFileTemplate._ft_id=this._ft_id;
		    NewFileTemplate._item_code=this._item_code;
		    NewFileTemplate._xls_url=this._xls_url;
		    NewFileTemplate._doc_url=this._doc_url;
		    NewFileTemplate._rem=this._rem;
		    NewFileTemplate._create_time=this._create_time;
			return NewFileTemplate;
		}
		
		private static MoFileTemplate _empty = new MoFileTemplate(string.Empty,string.Empty,string.Empty,string.Empty,string.Empty,DateTime.MinValue);
        public static MoFileTemplate Empty
        {
            get
            {
                return _empty;
            }
        }
		
		///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {
            if (base.Equals(obj))
            {
                return true;
            }
            else
            {
                MoFileTemplate NewFileTemplate = obj as MoFileTemplate;
                if (NewFileTemplate == null)
                {
                    return false;
                }
                else
                {
				if (NewFileTemplate.Ft_Id==this.Ft_Id && NewFileTemplate.Item_Code==this.Item_Code && NewFileTemplate.Xls_Url==this.Xls_Url && NewFileTemplate.Doc_Url==this.Doc_Url && NewFileTemplate.Rem==this.Rem && NewFileTemplate.Create_Time==this.Create_Time)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format("Ft_Id={0}/Item_Code={1}/Xls_Url={2}/Doc_Url={3}/Rem={4}/Create_Time={5}",_ft_id,_item_code,_xls_url,_doc_url,_rem,_create_time);
		 
		}
		#endregion
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["FT_ID"]!=null && row["FT_ID"]!=DBNull.Value)
			{
			    this.Ft_Id = (string)row["FT_ID"];
			}
			else
			{
				this.Ft_Id =string.Empty;
			}
		    if(row["Item_Code"]!=null && row["Item_Code"]!=DBNull.Value)
			{
			    this.Item_Code = (string)row["Item_Code"];
			}
			else
			{
				this.Item_Code =string.Empty;
			}
		    if(row["Xls_Url"]!=null && row["Xls_Url"]!=DBNull.Value)
			{
			    this.Xls_Url = (string)row["Xls_Url"];
			}
			else
			{
				this.Xls_Url =string.Empty;
			}
		    if(row["Doc_Url"]!=null && row["Doc_Url"]!=DBNull.Value)
			{
			    this.Doc_Url = (string)row["Doc_Url"];
			}
			else
			{
				this.Doc_Url =string.Empty;
			}
		    if(row["Rem"]!=null && row["Rem"]!=DBNull.Value)
			{
			    this.Rem = (string)row["Rem"];
			}
			else
			{
				this.Rem =string.Empty;
			}
		    if(row["Create_Time"]!=null && row["Create_Time"]!=DBNull.Value)
			{
			    this.Create_Time = (DateTime)row["Create_Time"];
			}
			else
			{
				this.Create_Time =DateTime.MinValue;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["FT_ID"] = this.Ft_Id;
			row["Item_Code"] = this.Item_Code;
			row["Xls_Url"] = this.Xls_Url;
			row["Doc_Url"] = this.Doc_Url;
			row["Rem"] = this.Rem;
			row["Create_Time"] = this.Create_Time;
		}
		#endregion
	}
}
#endregion
